package com.kwq.designPattern.construct.Filter;

import lombok.Data;

/**
 * @author kangwanqiang
 * @date 2021/2/6
 * @description 过滤器模式或标准模式，以Person类为例子
 */
public class Person {
    private String name;
    private Integer gender;
    private Integer maritalStatus;

    public Person(String name, Integer gender, Integer maritalStatus) {
        this.name = name;
        this.gender = gender;
        this.maritalStatus = maritalStatus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getMaritalStatus() {
        return maritalStatus;
    }

    public void setMaritalStatus(Integer maritalStatus) {
        this.maritalStatus = maritalStatus;
    }

    public enum Gender {
        MALE(1, "男性"), FEMALE(0, "女性");

        Integer value;
        String description;

        Gender(Integer val, String description) {
            this.value = val;
            this.description = description;
        }
    }

    public enum MaritalStatus {
        MARRIED(1, "已婚"), SINGLE(0, "单身");

        Integer value;
        String description;

        MaritalStatus(Integer value1, String description) {
            this.value = value1;
            this.description = description;
        }
    }
}
